//
//  ViewController.m
//  rtmp_test
//
//  Created by ztfgz on 2019/2/2.
//  Copyright © 2019 adiljan. All rights reserved.
//

#import "ViewController.h"
#import "VideoDetailViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
    [self.view addSubview:btn];
    [btn setTitle:@"点我" forState:UIControlStateNormal];
    btn.titleLabel.font = [UIFont systemFontOfSize:36];
    btn.backgroundColor = [UIColor blueColor];
    [btn addTarget:self action:@selector(playVideo:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)playVideo:(UIButton *)btn{
    VideoDetailViewController * bananerInfoVC = [[VideoDetailViewController alloc]init];
    UINavigationController * nvc = [[UINavigationController alloc]initWithRootViewController:bananerInfoVC];
    bananerInfoVC.vedioUrl = @"rtmp://media3.sinovision.net:1935/live/livestream";
    bananerInfoVC.titleName = @"测试";
    [self presentViewController:nvc animated:NO completion:nil];
}


@end

